package com.internal.spider;

import java.awt.Component;

import javax.swing.JFrame;
import javax.swing.JRootPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.component.swing.Frame;
import com.webserver.WebServer;


/**
 * 
 *
 */
public class App 
{
	final static Logger log = Logger.getLogger(App.class);
	
	
	public static Frame frame;
	
    public static void main( String[] args ) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
    {
//    	ApplicationContext context = 
//                new ClassPathXmlApplicationContext("/com/internal/spider/resources/applicationContext.xml");
//    	UIManager.setLookAndFeel(
//                UIManager.getSystemLookAndFeelClassName());
//    	
//    	frame = (Frame) context.getBean("frame");
//    	frame.setVisible(true);
//    	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    	
    	WebServer server = new WebServer(9523);
    	try {
			server.start();
			server.join();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	
    	
        log.info("Start Spider");
         
         
    }
    
  
    
}
